class CreateIncentiveImages < ActiveRecord::Migration
  def self.up 
    create_table :incentive_images do |t| 
      t.integer :incentive_id, :parent_id, :size, :width, :height 
      t.string :content_type, :filename, :thumbnail 
      t.timestamps 
    end 
    remove_column :incentives, :data
    remove_column :incentives, :content_type
  end 

  def self.down 
    drop_table :incentive_images
    add_column :incentives, :data, :binary # , :limit => 1.megabyte
    add_column :incentives, :content_type, :string
  end
end
